export const filterRoutes = (userPostion, allRoutes) => {
    let res = allRoutes.filter((item) => {
        return item.meta.jurisdiction.indexOf(userPostion) !== -1;
    });
    // 再判断res是否有children字段
    res.length && res.forEach((item) => {
        if (item.children) {
            item.children = filterRoutes(userPostion, item.children);
        }
    })
    return res
}